package com.trs.publish.domain;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

public class User extends BasicJavaBean implements Serializable{
	
	private static final long serialVersionUID = 3992469837058393712L;
    private Long id;
    
    @NotEmpty(message="用户不能为空")
    @Length(min = 3, max = 50, message="用户名最少3个字符最多50个字符")
    private String username;
    
    @NotEmpty(message="密码不能为空") 
    @Length(min = 3, max = 6, message="密码最少3个字符最多6个字符")
    private String password;

    private Date birthday;

    private Long flag;

    private Date createtime;
    
    @NotEmpty(message="证件号码不能为空")
    private String sfzh;
    
    @NotEmpty(message="真实姓名不能为空") 
    private String truename;

    private String department;

    private String telephone;
    
    @Email(message = "邮箱格式错误")
    private String email;

    private String role;
    
    private Date lastactivetime;
    
    private String lastactiveip;
    
    @NotEmpty(message="确认密码不能为空") 
    private String password2;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Long getFlag() {
        return flag;
    }

    public void setFlag(Long flag) {
        this.flag = flag;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getSfzh() {
        return sfzh;
    }

    public void setSfzh(String sfzh) {
        this.sfzh = sfzh == null ? null : sfzh.trim();
    }

    public String getTruename() {
        return truename;
    }

    public void setTruename(String truename) {
        this.truename = truename == null ? null : truename.trim();
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department == null ? null : department.trim();
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone == null ? null : telephone.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role == null ? null : role.trim();
    }

	public Date getLastactivetime() {
		return lastactivetime;
	}

	public void setLastactivetime(Date lastactivetime) {
		this.lastactivetime = lastactivetime;
	}

	public String getLastactiveip() {
		return lastactiveip;
	}

	public void setLastactiveip(String lastactiveip) {
		this.lastactiveip = lastactiveip;
	}

	public String getPassword2() {
		return password2;
	}

	public void setPassword2(String password2) {
		this.password2 = password2;
	}
	
	
}